package com.yanqu.road.server.cmd.marriage;

import com.yanqu.road.pb.marriage.CrossMarriageProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.marriage.CrossUnionMarriageMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.C_UNION_MARRIAGE_OVER_TIME_NOTIFY, desc = "跨服商会联姻超时")
public class CrossUnionMarriageOverTimeCmd extends CrossCommand {

    private String childUid;
    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        CrossMarriageProto.CrossMarriageOverTimeNotifyMsg reqMsg = CrossMarriageProto.CrossMarriageOverTimeNotifyMsg.parseFrom(packet.getBytes());
        childUid = reqMsg.getChildUid();
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        CrossUnionMarriageMgr.dealMarriageOverTime(childUid);
    }

    @Override
    public void sendData() {

    }
}
